import request from '../api'

const URL = '/task'

export function getAllTaskByPage(dto){
    return request.post(URL+'/getAllTaskByPage',dto)
}

export function deleteTaskById(id){
    return request.delete(URL+`/deleteTaskById/${id}`)
}

export function modifyTaskById(task){
    return request.put(URL+`/modifyTaskById`,task)
}

export function addTask(task){
    return request.post(URL+`/addTask`,task)
}

export function getTaskById(id){
    return request.get(URL+`/getTaskById/${id}`)
}

export function runTask(task){
    return request.post(URL+`/runTask`,task)
}